<include file="Common:header" />

<div class="table_content">
    <form action="{:U(MODULE_NAME.'/'.CONTROLLER_NAME.'/'.ACTION_NAME)}" method="post" class="ajax_form">
        <table class="edit_table">
            <tr>
                <td class="tablehead">用户名</td>
                <td><input type="text" name="username" class="text w150" value="{$adminInfo['user_name']}"/><label class="tips">用户名6~15个字符</label></td>
            </tr>
            
            <tr>
                <td class="tablehead">原始密码</td>
                <td><input type="password" name="original_password" id="original_password" class="text w150" value=""/><label class="tips"></label></td>
            </tr>
            <tr>
                <td class="tablehead">新密码</td>
                <td><input type="password" name="new_password" id="new_password" class="text w150" value=""/><label class="tips">密码9~16个字符</label></td>
            </tr>
            <tr>
                <td class="tablehead">确认新密码</td>
                <td><input type="password" name="repassword" id="repassword" class="text w150" value=""/><label class="tips">密码9~16个字符</label></td>
            </tr>
            <tr>
                <td class="tablehead"></td>
                <td>
                    <input type="button" class="save_btn" value="保存"/>
                    <input type="button" class="back_btn" value="返回"/>
                </td>
            </tr>
        </table>
    </form>
</div>

<script type="text/javascript">
    /*$(function() {
    	$('input.save_btn').click(function() {
    		var username = $('input[name=username]').val();
    		var original_password = $('input[name=original_password]').val();
    		var new_password = $('input[name=new_password]').val();
    		var repassword = $('input[name=repassword]').val();   		
    		$.ajax({
    	        url: "{:U(MODULE_NAME.'/'.CONTROLLER_NAME.'/'.ACTION_NAME)}?username=" + username + '&original_password=' + original_password + '&new_password=' + new_password + '&repassword=' + repassword,
    	        async: false,
    	        type: "GET",
    	        dataType: "json",
    	        success: function (msg) {       	        	
    	        	if(msg.status){
    	        		alert("haha");
    	        	}       	
    	        }
    	    });
        });
    });	 */
    $('input.save_btn').click(function() {
    	/* $.ajax({
	        url: "/Admin/edit_info",
	        async: false,
	        type: "get",
	        dataType: "json",
	        success: function (msg) {       	        	
	        	if(msg.status){
	        		alert("haha");
	        	}       	
	        }
	    }); */
        $(this).tyAjax({
            isForm: true,
            callBack: function(data) {
                callBackTips(data.status, data.info, data.url);
                //alert(data.status);
            }
        });
    });
    
    
    
    /* $(function() {
        
    }); */
        //$("#email").emailautocomplete();
        
        //$("input[type=password]").mobilePassword({
        //    checkInterval: 200, //set timeout to check whether all the characters are the same
        //    transDelay: 500,    //delay to transform last letter
        //});
    
</script>
<include file="Common:footer" />